<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class MiniProgramPage extends Model
{
    use SoftDeletes;
    protected $table = 'mini_program_page';
    protected $fillable=[ 'page_name', 'page_type', 'page_data','mini_id'];
    protected $appends = ['page_type_text'];

    public function getPageTypeTextAttribute()
    {
        $data =[
            10=>'首页',
            20=>'自定页',

        ];
        return $data[$this->page_type];
    }

}
